home *** CD-ROM | disk | FTP | other *** search
- /* LoadFile.xdme */
-
- options results
- address 'XDME.1'
- 'rxresult $filename'
- filename = result
-
- if exists(filename) then do
- call open(input,filename,"R")
- type = readch(input,4)
- if type = "XPKF" then do
- call seek(input,8,"B")
- method = readch(input,4)
- end
- else method = "NONE"
- call close(input)
- end
- else method = "NONE"
- F = '(' || filename || ')'
-
- if method = "FEAL" | method = "IDEA" then do
- xcom = "execute (copy """ || filename || """ t:temp)"
- xcom
- body = filename "is encrypted." '0A'x || "Please enter password."
- password = rtgetstring(,body,"Password Requester")
- xcom = 'execute (xpack t:temp password "' || password || '")'
- xcom
- newfile 't:temp'
- chfilename F
- xcom = 'settvar password' password
- xcom
- end
- else newfile F
-
- xsrc = filename || ".xsrc"
- if exists(xsrc) then source (xsrc)
- else call Mode (filename)
-
- if method ~= "NONE" then do
- xcom = 'settvar method' method
- xcom
- end
-